package bean;

public class ShopItems {
	int itemId;
	int itemGoods;
	int itemNum;
	int itemUser;
	Goods goodOfThisItem;
	double oneItemPrice = 0;
	double allItemPrice = 0;
	public int getItemId() {
		return itemId;
	}
	public void setItemId(int itemId) {
		this.itemId = itemId;
	}
	public int getItemGoods() {
		return itemGoods;
	}
	public void setItemGoods(int itemGoods) {
		this.itemGoods = itemGoods;
	}
	public int getItemNum() {
		return itemNum;
	}
	public void setItemNum(int itemNum) {
		this.itemNum = itemNum;
	}
	public int getItemUser() {
		return itemUser;
	}
	public void setItemUser(int itemUser) {
		this.itemUser = itemUser;
	}
	public Goods getGoodOfThisItem() {
		return goodOfThisItem;
	}
	public void setGoodOfThisItem(Goods goodOfThisItem) {
		this.goodOfThisItem = goodOfThisItem;
	}
	public double getAllItemPrice() {
		allItemPrice = itemNum*goodOfThisItem.getGoodsPrice();
		return allItemPrice;
	}
	public double getOneItemPrice() {
		oneItemPrice = goodOfThisItem.getGoodsPrice();
		return oneItemPrice;
	}
	@Override
	public String toString() {
		return "ShopItems [itemId=" + itemId + ", itemGoods=" + itemGoods + ", itemNum=" + itemNum + ", itemUser="
				+ itemUser + ", goodOfThisItem=" + goodOfThisItem + ", oneItemPrice=" + oneItemPrice + ", allItemPrice="
				+ allItemPrice + "]";
	}
	
	

}